releaseReservation
HTTP method: POST
https://testgateway.altapaysecure.com/merchant/API/releaseReservation
Use the releaseReservation method to release a reservation instead of capturing it.
If you use the releaseReservation on a payment that was reserved using the payment type, but later captured using the paymentAndCapture type - that payment will be refunded. This can happen when an acquirer doesn't support the payment type for captures. This applies to Swish, PPS, Swedbank - Lithuania, SEB - Lithuania, Handelsbanken - Finland, OP-Pohjola - Finland, Danske Bank - Finland, Nordea - Lithuania, Nordea - Finland, Nordea - Sweden, Przelewy24, Paysera, Sofort.
It is not possible to release part of a reservation. A release always covers the full amount of the reservation.
Parameter | Description | Type | Mandatory |
---|---|---|---|
transaction_id | The id of the transaction reservation you want to release. | [0-9a-f]{1,32} | X |
The table shows the most pertinent response values for the method. For a complete list of API response parameters, see API Response structure (XML).
Value |
Description |
---|---|
Result |
The result of the request, for example:
|
Transactions | Contains a set of Transaction elements, each describing the relevant transactions. For more information, see Transaction. |
Request
curl --request POST \ --url https://<YourShopName>.altapaysecure.com/merchant/API/releaseReservation \ --header 'Authorization: Basic auth' \ --data transaction_id=12345 \
Example XML response
<?xml version="1.0" encoding="utf-8" ?> <APIResponse version="20170228"> <Header> <Date>2020-09-29T12:34:56+02:00</Date> <Path>API/releaseReservation</Path> <ErrorCode>0</ErrorCode> <ErrorMessage></ErrorMessage> </Header> <Body> <Result>Success</Result> <CancelResult>Success</CancelResult> <!-- deprecated --> <Transactions> <Transaction> <TransactionId>1</TransactionId> <PaymentId>ccc1479c-37f9-4962-8d2c-662d75117e9d</PaymentId> <AuthType>payment</AuthType> <CardStatus>Valid</CardStatus> <CreditCardExpiry> <Year>2028</Year> <Month>08</Month> </CreditCardExpiry> <CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan> <CardInformation> <IsTokenized>false</IsTokenized> <Token>hYKu5yO33OsWYfT7g4weghvPjBnb3YEZYDysb7NzAf/sHk7j5j5ejzfF2ZyhLyggcCgaNKEmjg==+1</Token> <MaskedPan>411111******1111</MaskedPan> <Expiry> <Year>2028</Year> <Month>08</Month> </Expiry> <IssuingCountry>DK</IssuingCountry> <LastFourDigits>1111</LastFourDigits> <Scheme>VISA</Scheme> </CardInformation> <ThreeDSecureResult>Not_Applicable</ThreeDSecureResult> <InvoiceOrderInfo /> <LiableForChargeback>Merchant</LiableForChargeback> <BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId> <Shop>AltaPay Shop</Shop> <Terminal>AltaPay Test Terminal</Terminal> <TransactionStatus>released</TransactionStatus> <ReasonCode>NONE</ReasonCode> <MerchantCurrency>978</MerchantCurrency> <MerchantCurrencyAlpha>EUR</MerchantCurrencyAlpha> <CardHolderCurrency>978</CardHolderCurrency> <CardHolderCurrencyAlpha>EUR</CardHolderCurrencyAlpha> <ReservedAmount>1.00</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount> <RecurringDefaultAmount>0</RecurringDefaultAmount> <CreatedDate>2010-09-28 12:34:56</CreatedDate> <UpdatedDate>2010-09-28 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease> <SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService> <FraudRiskScore>13.37</FraudRiskScore> <FraudExplanation>Fraud detection explanation</FraudExplanation> <PaymentInfos> <PaymentInfo name="Form_Created_At">2010-09-28 12:34:56</PaymentInfo> <PaymentInfo name="Form_Provider">AltaPay Test Form</PaymentInfo> <PaymentInfo name="Merchant_Provided_Info">Some info by merchant</PaymentInfo> </PaymentInfos> <CustomerInfo> <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.41 Safari/535.7</UserAgent> <IpAddress>127.127.127.127</IpAddress> <Email>support@altapay.com</Email> <Username>support</Username> <CustomerPhone>+45 7020 0056</CustomerPhone> <OrganisationNumber>12345678</OrganisationNumber> <CountryOfOrigin> <Country>DK</Country> <Source>BillingAddress</Source> </CountryOfOrigin> <BillingAddress> <Firstname>Palle</Firstname> <Lastname>Simonsen</Lastname> <Address>Rosenkæret 13</Address> <City>Søborg</City> <PostalCode>2860</PostalCode> <Country>DK</Country> </BillingAddress> <ShippingAddress/> <RegisteredAddress/> </CustomerInfo> <ReconciliationIdentifiers/> </Transaction> </Transactions> </Body> </APIResponse>
Use the following to test credit card transactions.
Scenario | Error type | Amount | Card Number |
---|---|---|---|
Fails at releaseReservation. | Failed | 8.66 |
|
Fails at releaseReservation. | Error | 8.67 |
|